//
//  XLSwitchView.h
//  Home
//
//  Created by liusanchun on 14-8-15.
//  Copyright (c) 2014年 liusanchun. All rights reserved.
//

#import <UIKit/UIKit.h>
@class XLSwitchView;
@protocol XLSwitchViewDelegate <NSObject>

@required
- (NSInteger)numberOfItemsInSwitchView:(XLSwitchView*)switchView;
- (UIView *)setTabView:(XLSwitchView*)switchView withViewOfItem:(NSInteger)index;
- (UIViewController*)switchView:(XLSwitchView*)switchView withViewOfItem:(NSInteger)index;

@optional
- (void)didSelected:(XLSwitchView*)switchView withViewOfItem:(NSInteger)index;
-(void)ScrollAction:(NSInteger)index;

@end

@interface XLSwitchView : UIView

@property (assign,nonatomic)int btnWidth;
@property (assign,nonatomic)CGFloat topWidth;


@property (strong,nonatomic)UIColor *btncolor;
@property (strong,nonatomic)UIColor *inecolor;


@property (strong, nonatomic) UIScrollView *topScrollView;

@property (strong, nonatomic) UIScrollView *contentScrollView;

@property (strong, nonatomic) NSMutableArray *vcArray;

@property (assign, nonatomic) id<XLSwitchViewDelegate> delegate;

@property (assign, nonatomic) BOOL isCreateUserInterface;

@property (strong, nonatomic) UIView *shadowView;

@property (assign, nonatomic) int selectedTabIndex;


- (void)createUserInterface;

-(void)initViewLoaction;
@end
